]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
app-display: Enable swipe-scrolling in the app view
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 21 Jan 2011 18:50:25 +0000 (19:50 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 24 Jan 2011 01:59:46 +0000 (02:59 +0100)
With general support for swipe-scrolling in the overview, there is
no reason to limit the behavior to workspaces. It is equally useful
for scrolling through the grid of available applications, so enable
swipe-scrolling for the app view.

https://bugzilla.gnome.org/show_bug.cgi?id=635034

js/ui/appDisplay.js

index f1d44ebe73434a6538ba9503399abd2c73835454..6cefd6496b890baba7ff8c5455f17845c454b498 100644 (file)
@@ -43,6 +43,15 @@ AlphabeticalView.prototype = {
                                          vfade: true });
         this.actor.add_actor(box);
         this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
+        this.actor.connect('notify::mapped', Lang.bind(this,
+            function() {
+                if (!this.actor.mapped)
+                    return;
+
+                let adjustment = this.actor.vscroll.adjustment;
+                let direction = Overview.SwipeScrollDirection.VERTICAL;
+                Main.overview.setScrollAdjustment(adjustment, direction);
+            }));
     },
 
     _removeAll: function() {